/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package IpChat;


import java.util.*;



/**
 *
 * @author lubinchen
 */
public class SelectTeam {

     ArrayList<String> users=null;
     ArrayList<String> All_usersNames=null;
     ArrayList<String> All_usersIPs=null;
     ArrayList<Integer> All_usersLevel=null;


   // in case i need to resolve the string of all the online users
    public SelectTeam(String raw)
    {

         users=new ArrayList<String>(0);
         All_usersNames=new ArrayList<String>(0);
         All_usersIPs=new ArrayList<String>(0);
         All_usersLevel=new ArrayList<Integer>(0);

         StringTokenizer st = new StringTokenizer(raw);
         while (st.hasMoreTokens()) {
             users.add(st.nextToken());
         }


         for(int i=0; i<users.size();i++)
         {
             StringTokenizer stnew= new StringTokenizer(users.get(i), ",");
             while (stnew.hasMoreTokens())
             {
                 All_usersNames.add(   stnew.nextToken() );
                 All_usersIPs.add  (   stnew.nextToken());
                 All_usersLevel.add(   Integer.parseInt( stnew.nextToken() )   );
             }
         }

    }




    
}
